package com.ma.dao.order;

import com.ma.dto.OrderQueryParam;
import com.ma.pojo.Order;
import com.ma.pojo.OrderDetails;
import org.apache.ibatis.annotations.Param;
import org.aspectj.weaver.ast.Or;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

public interface OrderMapper {
    //查询所有订单总数
    int queryAllOrder();
    //查询所有订单
    List<Order> queryAll();
    //搜索功能整合
    String queryOrder(HashMap map);
    //通过订单编号查询
    Order queryByOrderId(@Param("orderId") String orderId);
    //通过提交时间查询
    Order queryByDate(Date orderDate);
    //通过客户编号查询
    Order queryByCustomerId(@Param("customerId") String customerId);
    //通过订单来源查询
    Order queryByPayWay(@Param("payWay") String payWay);
    //查询订单详情ByOrderId
    String queryOrderDetailsById(@Param("orderId") String orderId);
    ////查询订单详情ById
    OrderDetails queryOrderDetails(@Param("ID") String ID);

    //查询销售总金额
    float queryTotalPrice();

    /**
     * 条件查询订单
     */
    List<Order> getList(@Param("queryParam")OrderQueryParam orderQueryParam);

}
